﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using Model;


namespace MsDAL
{
    public partial class Pot0a01DAL : Pot0a01Base
    {
        public SqlApp DeleteAllByListId(string listid)
        {
            //删除所有子集别
            string sql = @" UPDATE Pot0a01 SET status = '4' WHERE plevercode = @listid ";

            SqlParameter[] parameters = {
				new SqlParameter("@listid",SqlDbType.NVarChar)
				};

            parameters[0].Value = listid;

            return new SqlApp(sql, new ArrayList(parameters), true, "");
        }

        public SqlApp DeleteAllById(string listid)
        {
            //删除所有子集别
            string sql = @" UPDATE Pot0a01 SET status = '4' WHERE listid = @listid ";

            SqlParameter[] parameters = {
				new SqlParameter("@listid",SqlDbType.NVarChar)
				};

            parameters[0].Value = listid;

            return new SqlApp(sql, new ArrayList(parameters), false, "删除失败！");
        }
    }
}
